﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TPager_List.aspx.cs" Inherits="ExamSystem.qt.TPager_List" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>考试管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="icon" href="../icon_txt.gif" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/lib/Hui-iconfont/1.0.8/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/style.css" />
    <script type="text/javascript" src="../h-ui/lib/jquery/1.9.1/jquery.min.js"></script> 
	<script type="text/javascript" src="../h-ui/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../h-ui/static/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript" src="../h-ui/static/h-ui.admin/js/H-ui.admin.js"></script>
    <script type="text/javascript" src="../h-ui/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript">
        //验证是否能进入考试
	    function isTest(time, id) {
	        var begin = new Date(time);
	        var end = new Date();
	        if (begin >= end) {
	            layer.alert("考试尚未开始,请等待");
	        } else {
	            document.location.href = "TQuestion_List.aspx?id="+id;
	        }
	    }
	</script>
</head>
<body>
   <form id="form1" runat="server">
        <div>
            <header class="navbar-wrapper" >
		        <div class="navbar navbar-fixed-top" style="background-color:orange">
			        <div class="container-fluid cl">
				        <a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:void(0)">考试管理系统</a> 
				        <span class="logo navbar-slogan f-l mr-10 hidden-xs">v1.0</span> 
				        <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
					        <ul class="cl">
						        <li>学生</li>
						        <li class="dropDown dropDown_hover">
							        <a href="#" class="dropDown_A"><label id="lbUname" runat="server" >张三</label> <i class="Hui-iconfont">&#xe6d5;</i></a>
							        <ul class="dropDown-menu menu radius box-shadow">
								        <li><a href="javascript:;" onclick="document.location.href='Login.aspx'">退出</a></li>
							        </ul>
						        </li>
					        </ul>
				        </nav>
			        </div>
		        </div>
	        </header>
            <div class="page-container">
                <div class="mt-20">
                    <table class="table table-border table-bordered table-bg table-hover table-sort">
                            <thead>
					            <tr class="text-c">
						            <th width="35%">试题名</th>
						            <th width="15%">开始时间</th>
						            <th width="15%">结束时间</th>
						            <th width="5%">满分</th>
						            <th width="5%">题量</th>
						            <th width="5%">成绩</th>
						            <th width="20%">状态</th>
					            </tr>
				            </thead>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <%
                                    if(list!=null&&list.Count>0)
                                    {
                                        foreach(ExamSystem.Mdeol.Tagerstudent tps in list)
                                        {
                                            ExamSystem.Mdeol.Tpager tp = tps.TpId;


                                     %>
                               <tr class="text-c">
						                <td><%=tp.TpName %></td>
						                <td><%=tp.TpBeginTime%></td>
						                <td><%=tp.TpEndTime%></td>
						                <td><%=tp.Tpscore%></td>
						                <td><%=tp.Tpcount%></td>
						                <td><%=tps.TsId.Tsscore%></td>
						                <td class="td-manage">
                                             <%
                                            if (DateTime.Now < Convert.ToDateTime(tp.TpEndTime) && tps.TpsState == 0)
                                                {
                                                %>
                                            <a style="text-decoration:none;color:green" class="ml-5" onclick="isTest('<%=tp.TpBeginTime %>',<%=tp.TpId %>)" href="javascript:;" title="进入考试">

								                进入考试
                                                </a>
                                                <%
                                           }
                                           else
                                                {
                                                    %>
                                            <font color="red">考试结束</font>
                                            <% }
                                            %>
							               
						                </td>
					                </tr>
                                <%
                                    }
                                    }
                                     %>
                                </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
